<%@ page import="java.util.Map" %><%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2021/11/3
  Time: 14:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    int count = (Integer) request.getAttribute("queCount");
    Map<Integer,Map<String,Object>> queInfo = (Map<Integer,Map<String,Object>>)request.getAttribute("queInfo");
%>
<center>
    <table border="2px">
        <tr>
            <td>id</td>
            <td>题目</td>
            <td>选项A</td>
            <td>选项B</td>
            <td>选项C</td>
            <td>选项D</td>
            <td>正确答案</td>
            <td colspan="2">试题操作</td>
        </tr>

        <%
            for(int i = 0;i < count;i++){
                Map<String,Object> thisQue = queInfo.get(i);
        %>
        <tr>
            <td><%=thisQue.get("id")%></td>
            <td><%=thisQue.get("question")%></td>
            <td><%=thisQue.get("optionA")%></td>
            <td><%=thisQue.get("optionB")%></td>
            <td><%=thisQue.get("optionC")%></td>
            <td><%=thisQue.get("optionD")%></td>
            <td><%=thisQue.get("answer")%></td>
            <td><a href="DelQue?id=<%=thisQue.get("id")%>">删除试题</a>></td>
            <td><a href="ShowOneQue?id=<%=thisQue.get("id")%>">修改试题</a>></td>
        </tr>
        <%
            }
        %>

    </table>
</center>


